home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / c / AmiVoGL_MDEV.lha / hershey / docs / hershey.doc < prev   
Text File  |  1991-08-25  |  10KB  |  397 lines

  1.  
  2.  
  3.  
  4. HERSHEY(3)             C LIBRARY FUNCTIONS             HERSHEY(3)
  5.  
  6.  
  7.  
  8. NAME
  9.      Hershey - A very ordinary library for using Hershey Fonts on
  10.      an SGI or with the VOGL(3) library.
  11.  
  12.  
  13. DESCRIPTION
  14.      The Hershey library is a set of C routines (with  a  FORTRAN
  15.      interface)  for  drawing the Hershey font data with programs
  16.      written with SGI-GL or the VOGL library. As Hershey  charac-
  17.      ters  are  defined  by a set of vectors, they are subject to
  18.      the current transformation matrix and  any  line  attributes
  19.      that have been set. There are also facilities for sizing and
  20.      rotating the characters in the library itself.
  21.  
  22.      The character data and the fonts supplied are based  on  the
  23.      character set digitized by Dr Allen V. Hershey while working
  24.      at the U. S. National Bureau of Standards.
  25.  
  26.  
  27.      Things to keep in mind.
  28.  
  29.      It should be noted that text is drawn parallel to the (x, y)
  30.      plane using whatever the current Z coordinate is.
  31.  
  32.      These routines change the current graphics position, that is
  33.      they draw the characters (or string) at the current graphics
  34.      position by using relative move/draw sequences.
  35.  
  36.      The library also supports the shortened  6  character  names
  37.      for  the  FORTRAN  interface. (Except for the routines hget-
  38.      fontheight and hgetfontwidth which have shortend 6 character
  39.      names of hgetfh and hgetfw respectively.
  40.  
  41.  
  42.      Loading a font.
  43.  
  44.      hfont(fontname) Set the current font
  45.  
  46.           Fortran:
  47.                subroutine hfont(fontname, len)
  48.                character*(*) fontname
  49.                integer len
  50.           C:
  51.                hfont(fontname)
  52.                     char *fontname
  53.  
  54.           There following names are available in this library.
  55.  
  56.           astrology       cursive         cyrillic        futura.l
  57.           futura.m        gothic.eng      gothic.ger      gothic.ita
  58.           greek           markers         math.low        math.upp
  59.           meteorology     music           script          symbolic
  60.  
  61.  
  62.  
  63. HERSHEY 1.01        Last change: 27 Aug 1991                    1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. HERSHEY(3)             C LIBRARY FUNCTIONS             HERSHEY(3)
  71.  
  72.  
  73.  
  74.           times.g         times.i         times.ib        times.r
  75.           times.rb        japanese
  76.  
  77.      A markers font "markers" is also provided for doing  markers
  78.      -  you  need to have centertext on for this to give sensible
  79.      results - with the markers starting at 'A' and 'a'.
  80.  
  81.      If the 'fontpath' has been set  with  hsetpath  (see  below)
  82.      then  hfont  looks  for  the software fonts in the directory
  83.      given.  Otherwise, if the environment variable "HFONTLIB" is
  84.      set  hfont  looks  for  the  software fonts in the directory
  85.      given by this value. To maintain compatiblity with VOGL  and
  86.      VOGLE, the envirionment variable "VFONTLIB" may be set simi-
  87.      larly to HFONTLIB.
  88.  
  89.  
  90.      hsetpath(fontpath)
  91.  
  92.      Set the directory to search for the current font file.
  93.  
  94.                Fortran:
  95.                     subroutine hsetpath(fontpath, len)
  96.                     character*(*) fontpath
  97.                     integer len
  98.                C:
  99.                     hsetpath(fontpath)
  100.                          char *fontpath
  101.  
  102.  
  103.      Setting the the character sizes
  104.  
  105.      htextsize(width, height)
  106.           Set the maximum size of a character  in  the  currently
  107.           loaded  Hershey  font.   Width and height are values in
  108.           world units.
  109.  
  110.                Fortran:
  111.                     subroutine htextsize(width, height)
  112.                     real width, height
  113.                C:
  114.                     htextsize(width, height)
  115.                          float     width, height;
  116.  
  117.  
  118.      hboxfit(l, h, nchars)
  119.           Set the scale for text so that a string of the  biggest
  120.           characters  in the font will fit in a box l by h. l and
  121.           h are real values in world dimensions.
  122.  
  123.                Fortran:
  124.                     subroutine hboxfit(l, h, nchars)
  125.                     real l, h
  126.  
  127.  
  128.  
  129. HERSHEY 1.01        Last change: 27 Aug 1991                    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. HERSHEY(3)             C LIBRARY FUNCTIONS             HERSHEY(3)
  137.  
  138.  
  139.  
  140.                     integer nchars
  141.                C:
  142.                     hboxfit(l, h, nchars)
  143.                          float     l, h
  144.                          int  nchars
  145.  
  146.  
  147.      Setting the text angle
  148.  
  149.      htextang(ang)
  150.           Set the text angle. All  Hershey  text  will  be  drawn
  151.           rotated  about  the Z-axis by the angle specified. This
  152.           angle is in degrees and is a floating point number.
  153.  
  154.                Fortran:
  155.                     subroutine htextang(ang)
  156.                     real ang
  157.                C:
  158.                     htextang(ang)
  159.                          float     ang;
  160.  
  161.  
  162.  
  163.      Setting the text attributes
  164.  
  165.      hfixedwidth(onoff)
  166.           Turns fixedwidth text on or off. Non-zero  (.true.)  is
  167.           on.  Causes  all Hershey text to be printed fixedwidth.
  168.           The width of each character cell is the  largest  width
  169.           of any character in the currently loaded font.
  170.  
  171.                Fortran:
  172.                     subroutine hfixedwidth(onoff)
  173.                     logical onoff
  174.                C:
  175.                     hfixedwidth(onoff)
  176.                          int onoff;
  177.  
  178.  
  179.      hcentertext(onoff)
  180.           Turns centertext text on or off. Non-zero  (.true.)  is
  181.           on. This centres strings and characters.
  182.  
  183.                Fortran:
  184.                     subroutine hcentertext(onoff)
  185.                     logical onoff
  186.                C:
  187.                     hcentertext(onoff)
  188.                          int onoff;
  189.  
  190.  
  191.      hrightjustify(onoff)
  192.  
  193.  
  194.  
  195. HERSHEY 1.01        Last change: 27 Aug 1991                    3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. HERSHEY(3)             C LIBRARY FUNCTIONS             HERSHEY(3)
  203.  
  204.  
  205.  
  206.           Turns rightjustify of text on or off. Non-zero (.true.)
  207.           is  on.  This  rightjustifies  strings  and characters.
  208.           Turning on rightjustify will turn  off  centertext  and
  209.           leftjustification.    Turning   off  rightjustification
  210.           returns to the default of leftjustification.
  211.  
  212.                Fortran:
  213.                     subroutine hrightjustify(onoff)
  214.                     logical onoff
  215.                C:
  216.                     hrightjustify(onoff)
  217.                          int onoff;
  218.  
  219.  
  220.      hleftjustify(onoff)
  221.           Turns leftjustify of text on or off. Non-zero  (.true.)
  222.           is on. This leftjustifies strings and characters. Turn-
  223.           ing  on  leftjustify  will  turn  off  centertext,  and
  224.           rightjustification.  Turning off leftjustification will
  225.           turn on rightjustification.
  226.  
  227.                Fortran:
  228.                     subroutine hleftjustify(onoff)
  229.                     logical onoff
  230.                C:
  231.                     hleftjustify(onoff)
  232.                          int onoff;
  233.  
  234.  
  235.  
  236.      Getting information about the currently loaded Hershey font.
  237.  
  238.      hgetcharsize(c, width, height)
  239.           Get the width and height of a character. At the  moment
  240.           the  height  returned  is always that of the difference
  241.           between the maximum descender and ascender.
  242.  
  243.                Fortran:
  244.                     subroutine hgetcharsize(c, width, height)
  245.                     character*1 c
  246.                     real width, height
  247.                C:
  248.                     hgetcharsize(c, width, height)
  249.                          char c;
  250.                          float     *width, *height;
  251.  
  252.  
  253.      hgetfontsize(width, height)
  254.           Get the maximum width and height of a  character  in  a
  255.           font.
  256.  
  257.                Fortran:
  258.  
  259.  
  260.  
  261. HERSHEY 1.01        Last change: 27 Aug 1991                    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. HERSHEY(3)             C LIBRARY FUNCTIONS             HERSHEY(3)
  269.  
  270.  
  271.  
  272.                     subroutine hgetfs(width, height)
  273.                     real width, height
  274.  
  275.                     subroutine hgetfontsize(width, height)
  276.                     real width, height
  277.                C:
  278.                     hgetfontsize(width, height)
  279.                          float     *width, *height;
  280.  
  281.  
  282.      hgetdescender()
  283.           Get the maximum descender in the current font.
  284.  
  285.                Fortran:
  286.                     real function getdescender()